
#include "S_25_AirConditionerDevMode_doGet.h"
#include "mi_iid_define.h"
#include "property_decoder.h"
#include "section_define.h"
#include "main.h"

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 1(Weak Cold), 2(Small Cold), 3(Comfort), 4(Big Cold), 5(Strong Cold)
 */
static void P_25_1_CoolingEffect_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection1 = {0};
#if 	PROPERTY_TYPE
	RegSection1.V8 = GetPbsRegValue(0x25);
//	if(RegSection1.BIT1.bit7)
	{
		property_value_new_integer(&o->value,RegSection1.BIT1.bit0_6);
	}
	
#else	
    o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 3; // TODO: 这里需要读到属性真正的值
#endif
}

/**
 * 格式: property_value_new_integer(整数)　
 * 取值: 1(Weak Heat), 2(Small Heat), 3(Comfort), 4(Big Heat), 5(Strong Heat)
 */
static void P_25_2_HeatingEffect_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection1 = {0};
#if 	PROPERTY_TYPE
	RegSection1.V8 = GetPbsRegValue(0x26);
//	if(RegSection1.BIT1.bit7)
	{
		property_value_new_integer(&o->value,RegSection1.BIT1.bit0_6);
	}
#else	
    o->value.format = PROPERTY_FORMAT_NUMBER;
	o->value.data.number.type = DATA_NUMBER_INTEGER;
	o->value.data.number.value.integerValue = 4; // TODO: 这里需要读到属性真正的值
#endif
}

/**
 * 格式: property_value_new_boolean(true 或 false)　
 * 取值: true 或　false
 */
static void P_25_3_RelieveAirDeflectorCondensation_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection1 = {0};
#if 	PROPERTY_TYPE
	RegSection1.V8 = GetPbsRegValue(0x05);
//	if(RegSection1.BIT.bit5)
	{
		property_value_new_boolean(&o->value,RegSection1.BIT.bit4);
	}
	
#else	
    o->value.format = PROPERTY_FORMAT_BOOLEAN;
    o->value.data.boolean.value = true; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_boolean(true 或 false)　
 * 取值: true 或　false
 */
static void P_25_4_CoolingOutdoorFanNoiseReduction_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection1 = {0};
#if 	PROPERTY_TYPE
	RegSection1.V8 = GetPbsRegValue(0x05);
//	if(RegSection1.BIT.bit3)
	{
		property_value_new_boolean(&o->value,RegSection1.BIT.bit2);
	}
#else	
    o->value.format = PROPERTY_FORMAT_BOOLEAN;
    o->value.data.boolean.value = true; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_boolean(true 或 false)　
 * 取值: true 或　false
 */
static void P_25_5_CoolingIndoorFanNoiseReduction_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection1 = {0};
#if 	PROPERTY_TYPE
	RegSection1.V8 = GetPbsRegValue(0x05);
//	if(RegSection1.BIT.bit1)
	{
		property_value_new_boolean(&o->value,RegSection1.BIT.bit0);
	}
#else	
    o->value.format = PROPERTY_FORMAT_BOOLEAN;
    o->value.data.boolean.value = true; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_boolean(true 或 false)　
 * 取值: true 或　false
 */
static void P_25_6_HeatingOutdoorFanNoiseReduction_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection1 = {0};
#if 	PROPERTY_TYPE
	RegSection1.V8 = GetPbsRegValue(0x06);
//	if(RegSection1.BIT.bit7)
	{
		property_value_new_boolean(&o->value,RegSection1.BIT.bit6);
	}
#else	
    o->value.format = PROPERTY_FORMAT_BOOLEAN;
    o->value.data.boolean.value = true; // TODO: 这里需要读到属性真正的值
#endif
    
}

/**
 * 格式: property_value_new_boolean(true 或 false)　
 * 取值: true 或　false
 */
static void P_25_7_HeatingIndoorFanNoiseReduction_doGet(property_operation_t *o)
{
	InDoorBusReg RegSection1 = {0};
#if 	PROPERTY_TYPE
	RegSection1.V8 = GetPbsRegValue(0x06);
//	if(RegSection1.BIT.bit5)
	{
		property_value_new_boolean(&o->value,RegSection1.BIT.bit4);
	}
#else	
    o->value.format = PROPERTY_FORMAT_BOOLEAN;
    o->value.data.boolean.value = true; // TODO: 这里需要读到属性真正的值
#endif
    
}

void S_25_AirConditionerDevMode_doGet(property_operation_t *o)
{
    switch (o->piid)
    {
        case PIID_25_1_CoolingEffect:
            P_25_1_CoolingEffect_doGet(o);
            break;

        case PIID_25_2_HeatingEffect:
            P_25_2_HeatingEffect_doGet(o);
            break;

        case PIID_25_3_RelieveAirDeflectorCondensation:
            P_25_3_RelieveAirDeflectorCondensation_doGet(o);
            break;

        case PIID_25_4_CoolingOutdoorFanNoiseReduction:
            P_25_4_CoolingOutdoorFanNoiseReduction_doGet(o);
            break;

        case PIID_25_5_CoolingIndoorFanNoiseReduction:
            P_25_5_CoolingIndoorFanNoiseReduction_doGet(o);
            break;

        case PIID_25_6_HeatingOutdoorFanNoiseReduction:
            P_25_6_HeatingOutdoorFanNoiseReduction_doGet(o);
            break;

        case PIID_25_7_HeatingIndoorFanNoiseReduction:
            P_25_7_HeatingIndoorFanNoiseReduction_doGet(o);
            break;

        default:
            o->code = OPERATION_ERROR_VALUE;
            break;
    }
}
